package web.weibo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Results;
import org.springframework.stereotype.Repository;
import web.weibo.model.*;

import java.util.ArrayList;

@Mapper
@Repository
public interface MapperWeibo {

    ArrayList<Weibo> currentUserWeibosWithComments(int userId);

    ArrayList<Weibo> allWeibosWithComments();

    ArrayList<Weibo> myComment(int userId);

    ArrayList<User> followUser(int userId);

    ArrayList<User> beFollowUser(int userId);

    User userComment(int userId);

    User userWeibo(int userId);

    Weibo weiboNow(int weiboId);

    Comment comment(int commentId);

    int countWeibo();

    int iscare(int currentUserId, int userId);

    int currentWeibos(int currentUserId);

    int countCares(int currentUserId);

    int countBeCares(int currentUserId);

    int countComment(int weiboId);

    int myAllComments(int currentUserId);

    void weiboAdd(String content, String createdTime, int userId);

    void commentAdd(String content, String createdTime, int userId, int weiboId);

    void weiboDelete(int id, int userId);

    void commentDelete(int id, int userId);

    void weiboUpdate(int id, String content, int userId);

    void commentUpdate(int id, String content, int userId);

    void follow(int currentUserId, int userId);

    void followOver(int currentUserId, int userId);

    void overFans(int currentUserId, int userId);
}
